#if !defined(__HTTP_REQUEST_H__)
#define __HTTP_REQUEST_H__
#include <boost/beast/http.hpp>
#include <map>
#include <string>

#include <boost/url.hpp>
#include <boost/url/parse_query.hpp>

using StringMap = std::map<std::string, std::string>;
class HttpRequest : public boost::beast::http::request<boost::beast::http::string_body>
{
public:
    using Field = boost::beast::http::field;

private:
    boost::urls::url url;
    StringMap map_params;
    StringMap map_heards;

public:
    HttpRequest();
    ~HttpRequest();
    void parse_url();
    std::string path() const;
    StringMap params() const;
    std::string field(Field field) const;
    std::string field(std::string field) const;

    std::string query() const;
    StringMap parse_query(std::string query) const;
    StringMap parse_cookie(std::string cookie) const;
};

#endif // __HTTP_REQUEST_H__
